#define _CRT_SECURE_NO_WARNINGS 1
#include"Heap.h"

//int main()
//{
//	Heap hp;
//	int a[] = { 5,7,6,8,9,1,3,4,6 };
//	int n = sizeof(a) / sizeof(a[0]);
//	HeapCreate(&hp, a, n);
//	while (!HeapEmpty(&hp))
//	{
//		int top = HeapTop(&hp);
//		printf("%d\n", top);
//		HeapPop(&hp);
//	}
//
//	return 0;
//}


int main()
{
	Heap hp;
	HeapInit(&hp);
	int a[] = { 40,50,10,61,72 };
	int n = sizeof(a) / sizeof(a[0]);
	for (int i = 0; i < n; i++)
	{
		HeapPush(&hp, a[i]);
	}
	while (!HeapEmpty(&hp))
	{
		int top = HeapTop(&hp);
		printf("%d\n", top);
		HeapPop(&hp);
 	}

	return 0;
}